<include file="Common/header" />
<!-- 顶部 -->     
<div id="middle">
    <include file="Common/menu" />
    <div class="right" id="mainFrame">
		<div class="right_cont">
			<ul class="breadcrumb">当前位置：
				<a href="javascript:void(0);">首页</a> <span class="divider">/</span>
				<a href="javascript:void(0);">基本信息管理</a> <span class="divider">/</span>
				水电气表管理
			</ul>
			<div class="title_right"><strong>添加水电气表</strong></div>
			<form action="" method="POST" id="addfrom">
				<div style="width: 900px; margin:auto">
					<table class="table table-bordered">
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">房间编号：</td>
							<td>
								<input type="hidden" name="eid" id="eid" value="0" />
								<input type="text" name="room_number" id="room_number" class="span1-3" value="" />
								<span class="usernameabel"></span>
							</td>
							<td width="20%" align="right" bgcolor="#f1f1f1"></td>
							<td>
								<span class="passwordabel"></span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">设备类型：</td>
							<td>
								<select id="typeid" name="typeid" class="span1-3" style="height: 25px; line-height: 25px; padding: 3px 3px;">
									<option value="1">水表</option>
									<option value="2">电表</option>
									<option value="3">气表</option>
								</select>
							</td>
							<td width="20%" align="right" bgcolor="#f1f1f1">计量设备ID：</td>
							<td>
								<input type="text" name="eqmnumber" id="eqmnumber" class="span1-3" value="{$info['eqmnumber']}" />
								<span class="passwordabel"></span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">原始起数：</td>
							<td>
								<input type="text" name="start_number" id="start_number" class="span1-3" value="{$info['start_number']}" />
								<span class="nicknameabel"></span>
							</td>
							<td width="20%" align="right" bgcolor="#f1f1f1">费率：</td>
							<td>
								<input type="text" name="rates" id="rates" class="span1-3" value="{$info['rates']}" />
								<span class="nicknameabel"></span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">设备编号：</td>
							<td colspan="3">
								<input type="text" name="eqmid" id="eqmid" class="span1-6" value="{$info['eqmid']}" />
								<span class="nicknameabel">* 用于修改设备数据标识使用</span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">指令1：</td>
							<td colspan="3">
								<input type="text" name="comd" id="comd" class="span1-6" value="{$info['comd']}" style="width: 300px;" />
								<span class="nicknameabel" style="color: red;">* 格式：  串口号|波特率|数据位|校验位|停止位|指令</span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">指令2：</td>
							<td colspan="3">
								<input type="text" name="comd2" id="comd2" class="span1-6" value="{$info['comd2']}" style="width: 300px;" />
								<span class="nicknameabel" style="color: red;">* 格式：  串口号|波特率|数据位|校验位|停止位|指令</span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">指令3：</td>
							<td colspan="3">
								<input type="text" name="comd3" id="comd3" class="span1-6" value="{$info['comd3']}" style="width: 300px;" />
								<span class="nicknameabel" style="color: red;">* 格式：  串口号|波特率|数据位|校验位|停止位|指令</span>
							</td>
						</tr>
					</table>
					
					<table  class="margin-bottom-20 table  no-border" >
						<tr>
							<td class="text-center">
								<input type="button" value="确定" class="btn btn-info roleSubmit" style="width:80px;" />
							</td>
						</tr>
					</table>
				</div>
			</form>
			<div class="title_right"><strong>设备列表</strong></div>
			<div id="ajaxDiv">
				<include file="Eqment/index_list" />
			</div>
		</div>     
    </div>
</div>
<script>
	$(document).ready(function(){
		$(".roleSubmit").on('click', function(){
			var load = layer.load(2);
			$.post('__ACTION__', $("#addfrom").serialize(), function(data){
				layer.msg(data);
				location.reload();
			});
		});
	});
</script>
<include file="Common/footer" />
